package mvc.view
{
	import flash.events.Event;
	import mx.events.FlexEvent;

	import mvc.view.components.CollView;
	import org.puremvc.as3.patterns.mediator.Mediator;
	import org.tools.att.Att;

	public class CollViewMediator extends Mediator
	{
        public static const NAME:String = 'CollViewMediator';
        public function 	CollViewMediator(viewComponent:Object){super( NAME, viewComponent );}
		private	function	onTrace(...args):void{Att.send('bTrace',String(Object(this).constructor),args);}
		override public function onRegister():void
		{
			onTrace("	onRegister	"+collView);
			collView.addEventListener(FlexEvent.HIDE, onHide);
		}
		protected function onHide(event:Event):void
		{
			onTrace("	onHide");
			collView.removeEventListener(FlexEvent.HIDE, onHide);
		}   
        protected function get collView():CollView{return viewComponent as CollView;}
	}
}
